package com.bwie.es.remote.impl;

import com.bwie.common.domain.Shop;
import com.bwie.common.result.Result;
import com.bwie.es.remote.EsRemote;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;

import java.util.List;
@Component
public class Fusing implements FallbackFactory<EsRemote> {
    @Override
    public EsRemote create(Throwable cause) {
        return new EsRemote() {
            @Override
            public Result<List<Shop>> queryShop() {
                throw new RuntimeException("远程调用失败");
            }
        };
    }
}
